<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/view/include/css-include.jsp"%>
<%@ include file="/view/include/jsp-include.jsp"%>
<%@ include file="/view/include/jquery-include.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<script type="text/javascript">

    $().ready(function() {
        view();
    
        $("#onList").bind("click",function(){
            location="/product.html";            
        });     
    });
    
    /* 조회 펑션 */
    function view(){
        $.post(
                '/getProductDetailView.json', {
                goodsCode : $("#goodsCodeHidden").val()
                },
            function(data) {
                //reSetValidete(); //벨류데이션 초기화
                
                searchDataMaping(data);    //DATA맵핑 
            });
    }
    
    /* searchData 맵핑 */
    function searchDataMaping(data){
        $("#goodsCode").empty().html(data.resultDetailMap['goodsCode']);
        $("#custName").empty().html(data.resultDetailMap['custName']);
        $("#goodsName").empty().html(data.resultDetailMap['goodsName']);
        $("#unit").empty().html(data.resultDetailMap['unit']);
        $("#boxQty").empty().html(data.resultDetailMap['boxQty']);
        $("#hsCode").empty().html(data.resultDetailMap['hsCode']);
        $("#productCode").empty().html(data.resultDetailMap['productCode']);
    }       
</script>
</head>
<body>
<div class="wrap">
    <div class="pagetitle">
        <h1>PRODUCT / DETAIL</h1>
    </div>
    <div class="">
        <table class="TableST">
            <tr>
                <th>Code</th>
                <td>
                    <span id="goodsCode"></span>
                </td>
            </tr>
            <tr>
                <th>Product</th>
                <td>
                    <span id="goodsName"></span>
                </td>
            </tr>
            <tr>
                <th>Unit</th>
                <td><span id="unit"></span>
                </td>
            </tr>
            <tr>
                <th>Box</th>
                <td><span id="boxQty"></span>
                </td>
            </tr>
            <tr>
                <th>H.S Code</th>
                <td><span id="hsCode"></span>
                </td>
            </tr>
            <tr>
                <th>Messrs</th>
                <td><span id="custName"></span>
                </td>
            </tr>
            <tr>
                <th>Product Code</th>
                <td>
                    <span id="productCode"></span>                    
                </td>
            </tr>            
         </table>
    </div>
    <div class="bo_btn">
        <ul class="btnst"><li class="a"><a href="#" id="onList" >LIST</a></li></ul>
    </div>
    <input type="hidden" name="goodsCodeHidden" id="goodsCodeHidden" value="${goodsCode}"/>
</div>
</body>
</html>